package com.qf.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author sunyamei
 * @version V1.0
 * @Project javase2203
 * @Package com.qf.controller
 * @Description:
 * @Date 2022/8/12 15:59
 */
@RestController
@RequestMapping("/test")
//接受动态刷新
@RefreshScope
public class TestController {

    //读取git码云中配置文件中的配置信息
    @Value("${version}")
    private String version;

    @RequestMapping("/t1")
    public String t1() {
        return "====" + version;
    }
}
